package com.duying.gh.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.busi.framework.base.BaseDao;
import com.duying.gh.model.People;

public class PeopleDao  extends BaseDao{
	public Class getEntityClass(){
		return People.class;
	}

	
	public List getByIdcard(String idcard){
		String hql = "from People p where p.id_card =:idcard";
		Map map = new HashMap();
		map.put("idcard", idcard);
		return super.getByHQL(hql, map);
	}
	
	/*
	public People getByMemberName2Idcard(String memberName , String idcard){
		String hql = "from People p where p.id_card =:idcard and p.member_name =:member_name ";
		Map map = new HashMap();
		map.put("idcard", idcard);
		map.put("member_name", memberName);
		List listPeople = super.getByHQL(hql, map);
		if(listPeople.isEmpty()){
			return null;
		}else{
			return (People)listPeople.get(0);
		}
	}
	*/
}
